﻿///<FileHeader>
///     <FileName>StandardValueProvider.cs</FileName>
///     <Author>Kiran Chand Palakkattiri</Author>
///     <Project>
///         <Name>Property Visibility Extensions for DSL</Name>
///         <Url>http://kiranchand.codeplex.com</Url>
///     </Project>
///     <CreationDate>October 12, 2009.</CreationDate>
///     <Contents>
///         <Content type="interface" name="IStandardValueProvider"
///             comments="Collection provider for extended string converter"/>
///     </Contents>
///     <Dependencies>
///         <Dependency type="reference" namespace="System" />
///         <Dependency type="reference" namespace="System.Collections.Generic" />
///     </Dependencies>
///     <Modifications>
///         <Modification changeset="1008" date="April 26, 2010" author="Kiran Chand Palakkattiri">
///             <Target="function" targetname="GetStandardValues(...)" type="update"
///                 comment="added refernce parameter for set operation."/>
///         </Modification>
///     </Modifications>
///     <Version>1.0.0.0</Version>
///</FileHeader>

using System;
using System.Collections.Generic;

namespace Kiranchand.Dsl.Extensions.PropertyVisibility
{
    /// <summary>
    /// Provides the mechanism for providing a standard set of values for a property 
    /// and validating the correctness of the values against it on request.
    /// </summary>
    public interface IStandardValueProvider
    {
        /// <summary>
        /// Gets the standard set of string values for a domain property when implemented in a model element
        /// </summary>
        /// <param name="domainPropertyID">guid of the domain property</param>
        /// <param name="operation">
        ///     the set operation needs to be performed.
        ///     <remarks>this is an optional parameter; hence using reference</remarks>
        /// </param>
        /// <returns>a generic enumerable collection of string</returns>
        IEnumerable<string> GetStandardValues(Guid domainPropertyID, ref SetOperation operation);
        /// <summary>
        /// Queries whether the standard value is supported for the given domain property
        /// when implemented in model element or not.
        /// </summary>
        /// <param name="domainPropertyID">guid of the domain property</param>
        /// <returns>a</returns>
        bool GetStandardValuesSupported(Guid domainPropertyID);
        /// <summary>
        /// Queries whether the standard value collection provided for the given domain property
        /// is an exclusive list when implemented in model element
        /// </summary>
        /// <param name="domainPropertyID"></param>
        /// <returns></returns>
        bool GetStandardValuesExclusive(Guid domainPropertyID);
        /// <summary>
        /// Validates whether the given value is matching for the given property of the model element.
        /// </summary>
        /// <param name="domainPropertyID">guid of the domain property</param>
        /// <param name="sValue">the new value choosen as string</param>
        /// <returns></returns>
        bool ValidateString(Guid domainPropertyID, string sValue);
    }
}
